<?php
/*
 * @author Mihail Markitan 
 * @email markitanm@gmail.com
 */
?>

<?php foreach ($data as $item): ?>

    Contract No :  <?= $item['contractid'] . "\n"?>
    Custno-Locno :      <?= $item['custno'] . ' - ' . $item['locno']. "\n" ?>
    Lastname : <?php
    $customer = Customers::model()->findByPk($item['custno']);
    echo $customer->lastname. "\n";
        ?>
    Sales Person :    <?=$item['salesperson'].' - '. Employees::getEmployeeName($item['salesperson']). "\n" ?>  
    Start Date :  <?= $item['contractstartdate'] . "\n"?>
    End date : <?= $item['contractenddate'] . "\n"?>
    Days until end :   <?= $item['days_until_end']. "\n" ?>

<?php endforeach; ?>
